<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/axios.min.js"></script>
</head>
<body>
    <button>发送请求1</button>
    <button>发送请求2</button>
</body>
<script>
    const btns = document.querySelectorAll("button");
	axios.defaults.baseURL = "http://zhangpeiyue.com";
	axios.defaults.params = {
		age:12
    }
	axios.defaults.headers = {
		token:100
    }
    // http://zhangpeiyue.com/scoreList
	btns[0].onclick = function(){
		axios.get("/scoreList",{
			// params:{
			// 	age:12
            // }
        }).then(value=>{
			console.log(value.data);
        })
    }
	btns[1].onclick = function(){
		axios.get("/scoreList",{
			params:{
				age:56
			}
		}).then(value=>{
			console.log(value.data);
		})
    }
</script>
</html>